layui.use(function () {
    $('#search-box').click(function () {
        if ($('.phonesearch-box')[0].style.display == 'block') {
            $('.phonesearch-box')[0].style.display = 'none'
        }
        $('.search-container').toggle()
        $('.phonesearch-box').toggle(500)
    })
});

function search() {
    let pcVal = document.getElementById('pcKeyVal').value
    let phVal = document.getElementById('phoneKeyVal').value
    if (pcVal == '' && phVal == '') {
        layer.msg('关键词不能为空', { icon: 5 })
        return false
    }
    let val = pcVal == '' ? phVal : pcVal
    window.location.href = '/index/article/search/key/' + val

}